Optimal. Leaf size=168 \[ \frac {2 \left (a+b \tanh ^{-1}(c+d x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c-d x}\right )}{d e}-\frac {b \left (a+b \tanh ^{-1}(c+d x)\right ) \text {PolyLog}\left (2,1-\frac {2}{1-c-d x}\right )}{d e}+\frac {b \left (a+b \tanh ^{-1}(c+d x)\right ) \text {PolyLog}\left (2,-1+\frac {2}{1-c-d x}\right )}{d e}+\frac {b^2 \text {PolyLog}\left (3,1-\frac {2}{1-c-d x}\right )}{2 d e}-\frac {b^2 \text {PolyLog}\left (3,-1+\frac {2}{1-c-d x}\right )}{2 d e} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.22, antiderivative size = 168, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {6242, 12, 6033,
6199, 6095, 6205, 6745} \begin {gather*} -\frac {b \text {Li}_2\left (1-\frac {2}{-c-d x+1}\right ) \left (a+b \tanh ^{-1}(c+d x)\right )}{d e}+\frac {b \text {Li}_2\left (\frac {2}{-c-d x+1}-1\right ) \left (a+b \tanh ^{-1}(c+d x)\right )}{d e}+\frac {2 \tanh ^{-1}\left (1-\frac {2}{-c-d x+1}\right ) \left (a+b \tanh ^{-1}(c+d x)\right )^2}{d e}+\frac {b^2 \text {Li}_3\left (1-\frac {2}{-c-d x+1}\right )}{2 d e}-\frac {b^2 \text {Li}_3\left (\frac {2}{-c-d x+1}-1\right )}{2 d e} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 6033
Rule 6095
Rule 6199
Rule 6205
Rule 6242
Rule 6745
Rubi steps
\begin {align*} \int \frac {\left (a+b \tanh ^{-1}(c+d x)\right )^2}{c e+d e x} \, dx &=\frac {\text {Subst}\left (\int \frac {\left (a+b \tanh ^{-1}(x)\right )^2}{e x} \, dx,x,c+d x\right )}{d}\\ &=\frac {\text {Subst}\left (\int \frac {\left (a+b \tanh ^{-1}(x)\right )^2}{x} \, dx,x,c+d x\right )}{d e}\\ &=\frac {2 \left (a+b \tanh ^{-1}(c+d x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c-d x}\right )}{d e}-\frac {(4 b) \text {Subst}\left (\int \frac {\tanh ^{-1}\left (1-\frac {2}{1-x}\right ) \left (a+b \tanh ^{-1}(x)\right )}{1-x^2} \, dx,x,c+d x\right )}{d e}\\ &=\frac {2 \left (a+b \tanh ^{-1}(c+d x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c-d x}\right )}{d e}-\frac {(2 b) \text {Subst}\left (\int \frac {\left (a+b \tanh ^{-1}(x)\right ) \log \left (2-\frac {2}{1-x}\right )}{1-x^2} \, dx,x,c+d x\right )}{d e}+\frac {(2 b) \text {Subst}\left (\int \frac {\left (a+b \tanh ^{-1}(x)\right ) \log \left (\frac {2}{1-x}\right )}{1-x^2} \, dx,x,c+d x\right )}{d e}\\ &=\frac {2 \left (a+b \tanh ^{-1}(c+d x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c-d x}\right )}{d e}-\frac {b \left (a+b \tanh ^{-1}(c+d x)\right ) \text {Li}_2\left (1-\frac {2}{1-c-d x}\right )}{d e}+\frac {b \left (a+b \tanh ^{-1}(c+d x)\right ) \text {Li}_2\left (-1+\frac {2}{1-c-d x}\right )}{d e}+\frac {b^2 \text {Subst}\left (\int \frac {\text {Li}_2\left (1-\frac {2}{1-x}\right )}{1-x^2} \, dx,x,c+d x\right )}{d e}-\frac {b^2 \text {Subst}\left (\int \frac {\text {Li}_2\left (-1+\frac {2}{1-x}\right )}{1-x^2} \, dx,x,c+d x\right )}{d e}\\ &=\frac {2 \left (a+b \tanh ^{-1}(c+d x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c-d x}\right )}{d e}-\frac {b \left (a+b \tanh ^{-1}(c+d x)\right ) \text {Li}_2\left (1-\frac {2}{1-c-d x}\right )}{d e}+\frac {b \left (a+b \tanh ^{-1}(c+d x)\right ) \text {Li}_2\left (-1+\frac {2}{1-c-d x}\right )}{d e}+\frac {b^2 \text {Li}_3\left (1-\frac {2}{1-c-d x}\right )}{2 d e}-\frac {b^2 \text {Li}_3\left (-1+\frac {2}{1-c-d x}\right )}{2 d e}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.26, size = 424, normalized size = 2.52 \begin {gather*} \frac {a^2 \log (c+d x)+2 a b \tanh ^{-1}(c+d x) \left (-\log \left (\frac {1}{\sqrt {1-(c+d x)^2}}\right )+\log \left (\frac {i (c+d x)}{\sqrt {1-(c+d x)^2}}\right )\right )-\frac {1}{4} a b \left (\pi ^2-4 i \pi \tanh ^{-1}(c+d x)-8 \tanh ^{-1}(c+d x)^2-8 \tanh ^{-1}(c+d x) \log \left (1-e^{-2 \tanh ^{-1}(c+d x)}\right )+4 i \pi \log \left (1+e^{2 \tanh ^{-1}(c+d x)}\right )+8 \tanh ^{-1}(c+d x) \log \left (1+e^{2 \tanh ^{-1}(c+d x)}\right )-4 i \pi \log \left (\frac {2}{\sqrt {1-(c+d x)^2}}\right )-8 \tanh ^{-1}(c+d x) \log \left (\frac {2}{\sqrt {1-(c+d x)^2}}\right )+8 \tanh ^{-1}(c+d x) \log \left (\frac {2 i (c+d x)}{\sqrt {1-(c+d x)^2}}\right )+4 \text {PolyLog}\left (2,e^{-2 \tanh ^{-1}(c+d x)}\right )+4 \text {PolyLog}\left (2,-e^{2 \tanh ^{-1}(c+d x)}\right )\right )+b^2 \left (\frac {i \pi ^3}{24}-\frac {2}{3} \tanh ^{-1}(c+d x)^3-\tanh ^{-1}(c+d x)^2 \log \left (1+e^{-2 \tanh ^{-1}(c+d x)}\right )+\tanh ^{-1}(c+d x)^2 \log \left (1-e^{2 \tanh ^{-1}(c+d x)}\right )+\tanh ^{-1}(c+d x) \text {PolyLog}\left (2,-e^{-2 \tanh ^{-1}(c+d x)}\right )+\tanh ^{-1}(c+d x) \text {PolyLog}\left (2,e^{2 \tanh ^{-1}(c+d x)}\right )+\frac {1}{2} \text {PolyLog}\left (3,-e^{-2 \tanh ^{-1}(c+d x)}\right )-\frac {1}{2} \text {PolyLog}\left (3,e^{2 \tanh ^{-1}(c+d x)}\right )\right )}{d e} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 11.78, size = 840, normalized size = 5.00 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {a^{2}}{c + d x}\, dx + \int \frac {b^{2} \operatorname {atanh}^{2}{\left (c + d x \right )}}{c + d x}\, dx + \int \frac {2 a b \operatorname {atanh}{\left (c + d x \right )}}{c + d x}\, dx}{e} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+b\,\mathrm {atanh}\left (c+d\,x\right )\right )}^2}{c\,e+d\,e\,x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________